Computer Science Engineering (CSE) Exam  >  Computer Science Engineering (CSE) Questions  >  Consider the following translation scheme:S &... Start Learning for Free
Consider the following translation scheme:
S → ER
R → *E {print ('*'); R}∈
E → F + E {print ('+');} F
F → (S) | id {print (id.value);}
Here, id is a token that represents an integer and id.value represents the corresponding integer value.
For an input '2 * 3 + 4', this translation scheme prints
  • a)
    2 * 3 + 4
  • b)
    2 * + 3 4 
  • c)
    2 3 * 4 +
  • d)
    2 3 4 + *
Correct answer is option 'B'. Can you explain this answer?
Most Upvoted Answer
Consider the following translation scheme:S → ERR → *E {prin...
Input string 2 * 3 + 4
  1. S → ER
  2. FR
  3. idR              {print,(2)}
  4. id * ER         { print, (*)}
  5. id * F + ER   {print, (+)}
  6. id * id + ER   {print, (3)}
  7. id * id + FR
  8. id * id + idR   {print (4)}
  9. id * id + id
So, 2 * + 3 4 is printed
Free Test
Community Answer
Consider the following translation scheme:S → ERR → *E {prin...
→ aA
A → bB
A → ε
B → cC
B → dD
C → eE
C → ε
D → fF
D → gG
E → hH
E → ε
F → iI
F → jJ
G → kK
G → ε
H → lL
H → ε
I → mM
I → ε
J → nN
J → ε
K → oO
K → ε
L → pP
L → ε
M → qQ
M → ε
N → rR
N → ε
O → sS
O → ε
P → tT
P → ε
Q → uU
Q → ε
R → vV
R → ε
S → wW
S → ε
T → xX
T → ε
U → yY
U → ε
V → zZ
V → ε
W → ε
X → ε
Y → ε
Z → ε

Given the above translation scheme, what would be the result of applying the translation scheme to the input string "abcdfghilp"?
Explore Courses for Computer Science Engineering (CSE) exam

Similar Computer Science Engineering (CSE) Doubts

Top Courses for Computer Science Engineering (CSE)

Consider the following translation scheme:S → ERR → *E {print (*); R}∈E→ F + E {print (+);} FF → (S) | id {print (id.value);}Here, id is a token that represents an integer and id.value represents the corresponding integer value.For an input 2 * 3 + 4, this translation scheme printsa)2 * 3 + 4b)2 * + 3 4c)2 3 * 4 +d)2 3 4 + *Correct answer is option 'B'. Can you explain this answer?
Question Description
Consider the following translation scheme:S → ERR → *E {print (*); R}∈E→ F + E {print (+);} FF → (S) | id {print (id.value);}Here, id is a token that represents an integer and id.value represents the corresponding integer value.For an input 2 * 3 + 4, this translation scheme printsa)2 * 3 + 4b)2 * + 3 4c)2 3 * 4 +d)2 3 4 + *Correct answer is option 'B'. Can you explain this answer? for Computer Science Engineering (CSE) 2024 is part of Computer Science Engineering (CSE) preparation. The Question and answers have been prepared according to the Computer Science Engineering (CSE) exam syllabus. Information about Consider the following translation scheme:S → ERR → *E {print (*); R}∈E→ F + E {print (+);} FF → (S) | id {print (id.value);}Here, id is a token that represents an integer and id.value represents the corresponding integer value.For an input 2 * 3 + 4, this translation scheme printsa)2 * 3 + 4b)2 * + 3 4c)2 3 * 4 +d)2 3 4 + *Correct answer is option 'B'. Can you explain this answer? covers all topics & solutions for Computer Science Engineering (CSE) 2024 Exam. Find important definitions, questions, meanings, examples, exercises and tests below for Consider the following translation scheme:S → ERR → *E {print (*); R}∈E→ F + E {print (+);} FF → (S) | id {print (id.value);}Here, id is a token that represents an integer and id.value represents the corresponding integer value.For an input 2 * 3 + 4, this translation scheme printsa)2 * 3 + 4b)2 * + 3 4c)2 3 * 4 +d)2 3 4 + *Correct answer is option 'B'. Can you explain this answer?.
Solutions for Consider the following translation scheme:S → ERR → *E {print (*); R}∈E→ F + E {print (+);} FF → (S) | id {print (id.value);}Here, id is a token that represents an integer and id.value represents the corresponding integer value.For an input 2 * 3 + 4, this translation scheme printsa)2 * 3 + 4b)2 * + 3 4c)2 3 * 4 +d)2 3 4 + *Correct answer is option 'B'. Can you explain this answer? in English & in Hindi are available as part of our courses for Computer Science Engineering (CSE). Download more important topics, notes, lectures and mock test series for Computer Science Engineering (CSE) Exam by signing up for free.
Here you can find the meaning of Consider the following translation scheme:S → ERR → *E {print (*); R}∈E→ F + E {print (+);} FF → (S) | id {print (id.value);}Here, id is a token that represents an integer and id.value represents the corresponding integer value.For an input 2 * 3 + 4, this translation scheme printsa)2 * 3 + 4b)2 * + 3 4c)2 3 * 4 +d)2 3 4 + *Correct answer is option 'B'. Can you explain this answer? defined & explained in the simplest way possible. Besides giving the explanation of Consider the following translation scheme:S → ERR → *E {print (*); R}∈E→ F + E {print (+);} FF → (S) | id {print (id.value);}Here, id is a token that represents an integer and id.value represents the corresponding integer value.For an input 2 * 3 + 4, this translation scheme printsa)2 * 3 + 4b)2 * + 3 4c)2 3 * 4 +d)2 3 4 + *Correct answer is option 'B'. Can you explain this answer?, a detailed solution for Consider the following translation scheme:S → ERR → *E {print (*); R}∈E→ F + E {print (+);} FF → (S) | id {print (id.value);}Here, id is a token that represents an integer and id.value represents the corresponding integer value.For an input 2 * 3 + 4, this translation scheme printsa)2 * 3 + 4b)2 * + 3 4c)2 3 * 4 +d)2 3 4 + *Correct answer is option 'B'. Can you explain this answer? has been provided alongside types of Consider the following translation scheme:S → ERR → *E {print (*); R}∈E→ F + E {print (+);} FF → (S) | id {print (id.value);}Here, id is a token that represents an integer and id.value represents the corresponding integer value.For an input 2 * 3 + 4, this translation scheme printsa)2 * 3 + 4b)2 * + 3 4c)2 3 * 4 +d)2 3 4 + *Correct answer is option 'B'. Can you explain this answer? theory, EduRev gives you an ample number of questions to practice Consider the following translation scheme:S → ERR → *E {print (*); R}∈E→ F + E {print (+);} FF → (S) | id {print (id.value);}Here, id is a token that represents an integer and id.value represents the corresponding integer value.For an input 2 * 3 + 4, this translation scheme printsa)2 * 3 + 4b)2 * + 3 4c)2 3 * 4 +d)2 3 4 + *Correct answer is option 'B'. Can you explain this answer? tests, examples and also practice Computer Science Engineering (CSE) tests.
Explore Courses for Computer Science Engineering (CSE) exam

Top Courses for Computer Science Engineering (CSE)

Explore Courses
Signup for Free!
Signup to see your scores go up within 7 days! Learn & Practice with 1000+ FREE Notes, Videos & Tests.
10M+ students study on EduRev